1. Field of the Invention
The present invention generally relates to reading and writing a shared memory and more specifically to a system and method for locking and unlocking access to the shared memory for atomic updates.
2. Description of the Related Art
Current mechanisms for locking and unlocking memory accesses to shared memory, such as a conventional load link and store-condition instructions that are used by many processors to implement atomic memory operations, check the lock status for each entry being accessed prior to each store (write) operation. Additionally, the requestor typically does not receive feedback on whether or not a lock has been acquired until after the store operation is attempted.
Accordingly, what is needed in the art is an improved locking mechanism for accessing shared memory to perform atomic memory operations.